﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Licenta1.Statements
{
    class ProcedureStatement:Statement
    {
        Expression name, param;
        Statement sts;

        public ProcedureStatement(Context con, Expression n, Expression p, Statement s)
            : base(con)
        {
            name = n;
            param = p;
            sts = s;
        }

        public override void Execute()
        {
            if (!context.variables.Contains(name.Value))
                context.variables.Add(name.Value, this);
        }
    }
}
